﻿using BCCommon.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace BCDto.MakeStaticPagingComponent.SystemServiceListing
{
    /// <summary>
    /// 系统服务列表请求模型
    /// </summary>
    public class SystemServiceListingRequestDto
    {
        /// <summary>
        /// 网站模板Id
        /// </summary>
        [Display(Name = "网站模板Id")]
        [Required(ErrorMessage = "{0} 不允许为空。")]
        public int WebsiteTemplateId { get; set; }
        /// <summary>
        /// 服务展示名称
        /// </summary>
        [Display(Name = "服务展示名称")]
        [Required(ErrorMessage ="{0} 不允许为空。")]
        [StringLength(30, MinimumLength = 1, ErrorMessage = "{0} 长度应为 {2} 到 {1} 个字符。")]
        public string DisplayName { get; set; }
        /// <summary>
        /// 服务详细描述
        /// </summary>
        [Display(Name = "服务详细描述")]
        [Required(ErrorMessage = "{0} 不允许为空。")]
        [StringLength(500, MinimumLength = 1, ErrorMessage = "{0} 长度应为 {2} 到 {1} 个字符。")]
        public string Description { get; set; }
        /// <summary>
        /// 系统服务名称
        /// </summary>
        [Display(Name = "系统服务名称")]
        [Required(ErrorMessage = "{0} 不允许为空。")]
        [StringLength(100, MinimumLength = 1, ErrorMessage = "{0} 长度应为 {2} 到 {1} 个字符。")]
        public string ServiceName { get; set; }
        /// <summary>
        /// 服务接口方法名称
        /// </summary>
        [Display(Name = "服务接口方法名称")]
        [Required(ErrorMessage = "{0} 不允许为空。")]
        [StringLength(100, MinimumLength = 1, ErrorMessage = "{0} 长度应为 {2} 到 {1} 个字符。")]
        public string MethodName { get; set; }
        /// <summary>
        /// 方法参数文本
        /// </summary>
        [Display(Name = "方法参数文本")]
        [StringLength(1000, MinimumLength = 0, ErrorMessage = "{0} 长度应为 {2} 到 {1} 个字符。")]
        public string ParamsText { get; set; }
        /// <summary>
        /// 方法参数描述
        /// </summary>
        [Display(Name = "方法参数描述")]
        [StringLength(1000, MinimumLength = 0, ErrorMessage = "{0} 长度应为 {2} 到 {1} 个字符。")]
        public string ParamsDesc { get; set; }
        /// <summary>
        /// 返回结果类型
        /// </summary>
        [Display(Name = "返回结果类型")]
        [Required(ErrorMessage = "{0} 不允许为空。")]
        public StaticPageResultType ResultType { get; set; }
        /// <summary>
        /// 返回对象名称
        /// </summary>
        public string ResultEntityName { get; set; }
    }
}
